<?php
echo "<h3>array_merge函数：合并一个或多个数组</h3>";
$arr1=['a','b','c'];
$arr2=['e','f','g'];
$arrAll=array_merge($arr1,$arr2);
var_dump($arrAll);

echo "<h3>array_push函数：将一个或多个单元压入数组的末尾</h3>";
$arr=['a','b','c'];
array_push($arr,"e");
var_dump($arr);

echo "<h3>count函数：计算数组中的单元数目或对象中的属性个数</h3>";
$arr=['a','b','c'];
var_dump(count($arr));


echo "<h3>in_array函数：查找数组中是否存在某个值</h3>";
$arr=['a','b','c'];
var_dump(in_array("a",$arr));

echo "<h3>rtrim函数：清除字符串末尾的空白(或其他字符)　</h3>";
$str="adbbbbbbb   ";
echo strlen($str);
echo "<br>";
echo strlen(rtrim($str));
echo "<h3>trim函数：截取字符串首尾的空格(或其他字符)　</h3>";

$str="   adbbbbbbb   ";
echo strlen($str);
echo "<br>";
echo strlen(trim($str));

echo "<h3>ltrim函数：清除字符串左端的连续空白(或者其他字符)　</h3>";


$str="   adbbbbbbb";
echo strlen($str);
echo "<br>";
echo strlen(ltrim($str));

echo "<h3>strtolower函数：将字符串中的字母全部转换为小写　</h3>";

$str="ASSSS";
echo strtolower($str);

echo "<h3>strtoupper函数：将字符串中的字母全部转换为大写　</h3>";

$str="assss";
echo strtoupper($str);

echo "<h3>explode函数：将字符串按指定字符切开　</h3>";

$str="a,s,s,s,s";
var_dump(explode(",",$str));


echo "<h3>implode函数：将数组合并为字符串　</h3>";

$arr=['a','b','c'];
var_dump(implode($arr));

echo "<h3>str_replace函数：区分大小写的字符串替换</h3>";

$str="a,s,s,s,s";
echo str_replace(",","/",$str);

echo "<h3>strlen函数：统计字符串的长度（单字节字符）</h3>";


$str="dddd";
echo strlen($str);


echo "<h3>mb_strlen函数：统计字符串的长度（包括多字节字符）</h3>";


$str="你好";
echo mb_strlen($str);

echo "<h3>substr函数：截取字符串　（单字节字符）</h3>";

$str="dasd";
echo substr($str,1,2);

echo "<h3>mb_substr函数：截取字符串　（包括多字节字符）</h3>";

$str="你好";
echo mb_substr($str,0,1);

echo "<h3>md5函数：对一个字符串进行MD5加密　</h3>";
$str="你好";
echo md5($str);